//package com.itheima.mall.web.sso;
//
//import com.itheima.mall.commons.result.Result;
//import com.itheima.mall.sso.api.SsoService;
//import com.itheima.mall.sso.pojo.LoginUser;
//import org.apache.dubbo.config.annotation.DubboReference;
//import org.springframework.web.bind.annotation.*;
//
//@RestController
//@RequestMapping("/admin")
////@CrossOrigin(origins = "*")
//public class SsoLogin {
//
//    @DubboReference
//    private SsoService ssoService;
//
//    @PostMapping("/login")
//    public Result login(@RequestBody LoginUser loginUser) {
//        LoginUser login = ssoService.login(loginUser);
//        System.out.println(login.toString());
//        if (login == null) {
//            return Result.error();
//        }
//        Result result = Result.success();
//        result.put("token", login.getToken());
//        return result;
//    }
//}
